<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es">
  <head>
    <title><%= APP_CONFIG[:app_name] %> - <%= lugar_actual %> </title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <%=stylesheet_link_tag "application.css","overcast/jquery-ui-1.7.2.custom.css", "ui.jqgrid.css", "tabs-no-images", "colorbox","small-tabs","jquery.ui.autocomplete" %>
    <%=javascript_include_tag :defaults, "jquery.colorbox-min.js", "jquery.tools.min.js", "ui.datepicker-es.js", "jquery.validate.js" %>
    <%=javascript_include_tag "i18n/grid.locale-sp.js", "jquery.jqGrid.js","autoLoader.js","autoNumeric-1.6.2.js" %>
    <%=javascript_include_tag "messages_es.js", "application.js","jquery-autocomplete/jquery.autocomplete_original.js","jquery.blockUI.js" %>
    <%#= GMap.header(:local_search => true) if (controller_name=="usuarios")%>
    <script type="text/javascript">
      function formatDateFields(clase){
      if (clase==null){clase="dp"};
      $('input.'+clase).datepicker($.extend({},
      $.datepicker.regional["es"], {
      showStatus: true,
      showOn: "both",
      buttonImage: "<%= ENV['RAILS_RELATIVE_URL_ROOT'] %>/images/calendar.png",
      changeYear: true,
      buttonImageOnly: true
      }));
      };

      function validateForms(){
      $("form").validate({
      errorElement: "em",
      wrapper: "li"
      });
      };

      $(document).ready(function(){
      formatDateFields();
      validateForms();
      <%= yield :jquery %>
      });
    </script>
    <%= yield :js %>
  </head>
  <body>
    <div id="wrapper">
      <div id="wrapper2">

        <div id="top-menu">
          <div id="account">
            <ul>
              <% if current_user -%>
                <li>Conectado como <%= boton current_user.nombres,micuenta_usuarios_path%> - <%= boton "Cerrar Sesi&oacute;n", logout_path %></li>
              <% end -%>
            </ul>
          </div>
          <ul>
            <li>
              <%= boton "Inicio",micuenta_usuarios_path%>/
              <%= boton "Marcaci&oacute;n",marcacion_manual_marcaciones_path%>
            </li>
          </ul>
        </div>

        <div id="header">
          <h1><%= APP_CONFIG[:app_name] %></h1>
          <div id="main-menu">
            <% if current_user -%>
              <%= render :partial => "layouts/menu" %>
            <% end -%>
          </div>
        </div>

        <div class="" id="main">
        </div>


        <div class="contenedor">
          <div id="content">
            <%= render_flash_messages %>
            <%= yield %>
          </div>
          <div id="sidebar">
            <%= yield :sidebar %>
          </div>
        </div>
      </div>

      <div id="footer">
        <div class="bgl">
          <div class="bgr">
            Powered by <a href="#">DoTech Software</a> &copy; 2012
          </div>
        </div>
      </div>
    </div>
  </body>
</html>

